var http = require("http");

function requestHandler(req,res){
	// console.log("In comes a request to : "+ request.url);
	// response.end("Hello world");

	if (req.url === "/") {
		res.end("Welcome to the homepage!");
	}else if(req.url === "/about"){
		res.end("Welcome to the about page!");
	}else{
		res.end("error file not found");
	}
}


var server = http.createServer(requestHandler);

server.listen(3000);